<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{{ name }}</title>
    <link rel="stylesheet" href="/static/normalize.css" />
    <link rel="icon" href="/static/logo.png" type="image/x-icon" />
  </head>

  <body style="color: #0000ff">
    <h1>Page 1</h1>
    <input id="env" value="{{ env }}" style="display: none" />
    <input id="options" value="{{ options }}" style="display: none" />
    <button onclick="handClick()">发送请求</button>
  </body>
  <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/blueimp-md5/2.19.0/js/md5.js"></script>
  <script type="text/javascript">
    try {
      window.env = document.getElementById('env').value;
      const options = document.getElementById('options').value;
      window.options = JSON.parse(options);
    } catch (e) {
      console.log(e);
    }
    const handClick = function () {
      const signKey = 'fe7f165ec0314deea95fd9d391800c0c';
      const st = Date.now();
      axios
        .request({
          method: 'get',
          url: '/api/project/list/23',
          // params: { proj_key: 'test' },
          headers: {
            s_t: st,
            s_sign: md5(`${signKey}_${st}`),
          },
        })
        .then(res => {
          console.log(res);
        });
    };
  </script>
</html>
